function main() {
    debugger;
    // 获取组件元素和值
    const sinEle = this.$$("radio_ena4o9");
    const selectedValue = sinEle.$$getValue();
    console.log(selectedValue);

    // 获取需要设置验证规则的组件
    const educationTypeField = this.$$("text_input_etyyxc"); // 教育类型
    const majorField = this.$$("date_picker_d3ruy5");          // 专业

    // 验证规则配置
    const requiredRule = {
        text: "必填",
        type: "required",
        disable: false,
        message: "该项为必填项",
        trigger: ['change', 'blur']
    };

    const shouldValidate = ['1'].includes(selectedValue);

    // 设置验证规则
    setValidationRules(educationTypeField, shouldValidate, [requiredRule]);
    setValidationRules(majorField, shouldValidate, [requiredRule]);
}

function setValidationRules(field, condition, rules) {
    field.data.props.validation = condition ? rules : [];
}
